<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp" %>
<html>
<head>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
	function setThingEntrustId(id){
		parent.setThingEntrustId(id);
	}
	function init(flag){
		if(false == flag){
			return false;
		}
		return ShowContextMenu(event,'quick_rightmenu');
	}
   function resize(){
   		var frameObj = parent.window.document.all('thingEntrustList');
   		if(frameObj == null){
   			document.getElementById("divId").style.height = "220";
			frameObj = parent.window.document.all('frameList');
		}
		frameObj.height=document.body.scrollHeight;
	}
	function freshFrame(){
		parent.pageNO=document.getElementById("ec_p").value;
	}
</script>
</head>
<body onload="resize();">
<div style="overflow:auto; height:320px;" id="divId">
<ec:ceTable items="thingEntrustList"
	action="${ctx}/thing_thingEntrustAction.do?method=thingEntrustList&isShowMenu=true"
	var="thingEntrustItem"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="10" >
	<ec:ceRow ondblclick="parent.showDetail();return false;" styleClass="grid" onclick="setThingEntrustId('${thingEntrustItem.keyword }')"
	  onContextMenu="init(${isShowMenu });" >
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="楼 栋" property="buildingName"  />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="房 号" property="houseNumber"  />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="托管人" property="entrustMan" />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="托管物品" property="entrustItem" />
		<ec:ceColumn width="20%" styleClass="align_left" headerCell="pmsHeadrCell" title="托管原因" property="entrustReason" />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="接受人(托管)" property="accepterName" />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="接收日期" property="acceptDate" cell="date" format="yyyy-MM-dd"/>
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="归还人" property="givebackMan" />
		<ec:ceColumn width="8%" styleClass="align_left" headerCell="pmsHeadrCell" title="归还日期" property="givebackDate" cell="date" format="yyyy-MM-dd"/>
	</ec:ceRow>
</ec:ceTable>
</div>

<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_menu2" onMouseOver="showmy2menu('quick_rightmenu')"  onMouseOut="hidden2menu('quick_rightmenu')" >
   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="grid_quickMenu_bg" >

    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
         <pms:AuthTag authName="thing_thingEntrustAction.do?method=initThingEntrustAdd">
		  <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.openThingEntrust();return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新建"/>&nbsp;新 增</a></td>
        </tr>
        </pms:AuthTag>
		<pms:AuthTag authName="thing_thingEntrustAction.do?method=initThingEntrustEdit">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="parent.openThingEntrustEdit();return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="修改"/>&nbsp;修 改</a></td>
        </tr>
        </pms:AuthTag>
		<pms:AuthTag authName="thing_thingEntrustAction.do?method=deleteThingEntrust">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#" onClick="parent.showThingEntrustDelete();return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="" width="16" height="16" border="0" align="absbottom" /> 删
            除</a></td>
        </tr>
        </pms:AuthTag>
		<pms:AuthTag authName="thing_thingEntrustAction.do?method=initThingGiveback">
		<tr>
		   <td class="hrpading"><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     <tr><td class="quickMenu_line"></td></tr></table></td>
          </tr>
        <tr>
          <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()"  onClick="parent.openThingGiveback();return false;"><img src="${ctx}/images/ico_yaoshi_huan.gif" alt="物品归还" border="0" align="absbottom"/>&nbsp;物品归还</a></td>
          </tr>
        </pms:AuthTag>
      </table></td>
    </tr>
  </table>
 <script type="text/javascript">

	var thingEntrustDiv=document.getElementById('quick_rightmenu');
	if(thingEntrustDiv.getElementsByTagName("tr").length==1){
	thingEntrustDiv.innerHTML="";
	}
</script>
</div>
</body>
</html>